home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
amok_lha
/
amok15.lha
/
Seafarers_Manual
/
Source
/
FileMake.mod
< prev
next >
Wrap
Text File
|
1993-08-15
|
1KB
|
42 lines
MODULE FileMake; (* Sequential file creation *)
(* From the book "Modula-2 A Seafarer's Manual and Shipyard Guide" *)
(* Page 128 adapted "Amiga M2Modula-2" 09 Mar 1988 *)
FROM InOut IMPORT eol, (* end of line *)
done, (* status of operation
TRUE => success
FALSE => failure *)
OpenOutput, (* accept file name from terminal
& open it for output *)
CloseOutput, (* close output file *)
Write, (* write character *)
WriteCard, (* write cardinal value *)
WriteLn, (* write cr/line feed *)
WriteString; (* write string *)
CONST
JobDes = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
VAR
CrewNum : [1..100];
BEGIN
WriteString ("Enter output file name: ");
REPEAT
OpenOutput (""); (* supply no default extension *)
UNTIL done;
FOR CrewNum := 1 TO 100 BY 1 DO
WriteCard (CrewNum,8);
WriteString (JobDes);
Write (eol);
END;
CloseOutput;
WriteString ("File creation complete");
WriteLn;
END FileMake.